package com.tsinghua.server.base.controller;

import com.tsinghua.server.common.Result;
import com.tsinghua.server.base.service.EChartDataService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

/**
 * @description:
 * @author: Mr.Eric
 * @create: 2022/2/24 21:24
 */
@RestController
@RequestMapping(value = "chart")
@RequiredArgsConstructor
public class EChartDataController {


    private final EChartDataService eChartDataService;

    @GetMapping(value = "industry/debt")
    public Result industry() throws IOException {
        return Result.succ(eChartDataService.industryDebt());
    }

    @GetMapping(value = "data2")
    public Result data2() {
        return Result.succ(eChartDataService.data2());
    }




}
